package cn.kgc.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.*;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;

/**
 * 商品spu积分设置(SmsSpuBounds)表实体类
 *
 * @author makejava
 * @since 2022-12-05 14:59:26
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "sms_spu_bounds")
@SuppressWarnings("serial")
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class SmsSpuBounds extends Model<SmsSpuBounds> implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id; //主键


    @TableField(value = "spu_id")
    private Long spuId;


    /**
     * 成长积分
     **/
    @TableField(value = "grow_bounds")
    private BigDecimal growBounds;


    /**
     * 购物积分
     **/
    @TableField(value = "buy_bounds")
    private BigDecimal buyBounds;


    /**
     * 优惠生效情况[1111（四个状态位，从右到左）;0 - 无优惠，成长积分是否赠送;1 - 无优惠，购物积分是否赠送;2 - 有优惠，成长积分是否赠送;3 - 有优惠，购物积分是否赠送【状态位0：不赠送，1：赠送】]
     **/
    @TableField(value = "work")
    private Short work;


    @TableField(value = "creationdate", fill = FieldFill.INSERT)
    @JsonIgnore
    private Date creationdate; //创建时间


    @TableField(value = "modifydate", fill = FieldFill.UPDATE)
    @JsonIgnore
    private Date modifydate; //修改时间


    @Version
    private int version;   //版本


    @TableLogic
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT)
    private int deleted;  //逻辑删除标志


}
